﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;


namespace STF.OrangeDog.Model
{
    public class HAdmins:BaseModel
    {
        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(50), Column(TypeName = "varchar(50)")]
        [Display(Name = "管理员账号")]
        public string Account { get; set; }

        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(50), Column(TypeName = "varchar(50)")]
        [Display(Name = "管理员密码")]
        public string Password { get; set; }

        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(50), Column(TypeName = "varchar(50)")]
        [Display(Name = "管理员名称")]
        public string RealName { get; set; }

        [Required(ErrorMessage = "{0}不能为空")]
        [Display(Name = "管理员性别")]
        public int Gender { get; set; }

        [Required(ErrorMessage = "{0}不能为空")]
        [Column(TypeName = "date")]
        [Display(Name = "管理员出生日期")]
        public DateTime Birthday { get; set; }

        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(50), Column(TypeName = "varchar(50)")]
        [Display(Name = "管理员头像")]
        public string Photo { get; set; }

        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(50), Column(TypeName = "varchar(50)")]
        [Display(Name = "联系电话")]
        public string Phone { get; set; }

        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(50), Column(TypeName = "varchar(50)")]
        [Display(Name = "电子邮箱")]
        public string Email { get; set; }

        [Required(ErrorMessage = "{0}不能为空")]
        [Display(Name = "权限编号")]
        [ForeignKey(nameof(HRoles))]
        public int RolesId { get; set; }
    }
}
